/* Tutorial CSS starts here */
:root {
  --bg: white;
  --text: black;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: black;
    --text: white;
  }
}

#color-mode:checked ~ * {
  --bg: black;
  --text: white;
}

@media (prefers-color-scheme: dark) {
  #color-mode:checked ~ * {
    --bg: white;
    --text: black;
  }
}

.color-scheme-wrapper {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.light-mode-hide {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .dark-mode-hide {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  .light-mode-hide {
    display: initial;
  }
}

/* Tutorial css ends here, the rest is extra styles for prettiness */

:root {
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir,
    helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial, sans-serif;
}

* {
  box-sizing: border-box;
  max-width: 35rem;
}

html,
body,
div {
  max-width: none;
}

p {
  line-height: 1.5;
}

code {
  font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console,
    monospace;
}

input[type="checkbox"] {
  opacity: 0.00001;
  position: absolute;
}

html,
body {
  padding: 0;
  margin: 0;
}

div > * + *,
ul > * + * {
  margin-top: 1.5rem;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

label {
  cursor: pointer;
  position: absolute;
  background: var(--text);
  color: var(--bg);
  padding: 1rem;
  top: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  border-radius: 6px;
  box-shadow: 0 2px var(--bg), 0 4px var(--text);
  user-select: none;
}

input[type="checkbox"]:focus + label {
  outline: 2px dashed red;
  outline-offset: 4px;
}

label:active {
  transform: translateY(1px);
  box-shadow: 0 1px var(--bg), 0 3px var(--text);
}

label:after {
  content: "✔";
  height: 1.2rem;
  width: 1.2rem;
  margin-left: 1rem;
  border: solid 2px var(--bg);
  text-align: center;
  border-radius: 4px;
  color: transparent;
}

#color-mode:checked + label:after {
  color: var(--bg);
}

.color-scheme-wrapper {
  padding: 5rem 1rem;
}

a {
  color: inherit;
  text-decoration: none;
  border: dotted 1px var(--text);
  padding: 0.1em 0.2em;
}

ul {
  list-style: none;
  margin: 0;
  padding-left: 1rem;
}

li:before {
  margin-left: -1rem;
  float: left;
  content: "▸";
  color: red;
}
